/*
 *  eventHandlers.c
 *  pr1
 *
 *  Created by Javier Quevedo on 11/3/08.
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
 *
 */
#include <GLUT/glut.h>
//#include <GL/glut.h>

#include "eventHandlers.h"
#include"glOperations.h"
#include <stdio.h>

int cX = 5;
int cY = 5;
int cZ = 5;

int width,height;
Camera * camera;
/*
void eventsSetCamera(Camera *_camera)
{
	camera = _camera;
	
}

*/
void reshapeEventHandler(int _width, int _height)
{

	width = _width;
	height = _height;
	glViewport(0, 0, _width, _height);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluPerspective(90.0, _width/_height, 1.0, 100.0);
	//glFrustum(-1.0, 1.0, -1.0, 1.0, 1.5, 20.0);
	//gluLookAt(8, 8, 8, 0, 0, 0, 0, 1, 0);
	//gluLookAt(5, 5, 5, 0 , 0 , 0,0.0 ,1.0 ,0);
	glMatrixMode(GL_MODELVIEW);
	//glLoadIdentity();
	//
//	glViewport(0, 0, width, height);
//	gluLookAt(10, 10, 10, 0, 0, 0, 0, 1, 0);
//	you might use it like this
//	gluLookAt(Player->position.x, Player->position.y,
//			  Player->position.z,LookAt.x, LookAt.y, LookAt.z,0.0, 1.0, 0.0);
//	(Keeps the "camera" following the player and has it looking at position LookAt)
}


void motionEventHandler (int x, int y)
{
	printf ("Button clicked while at pos X:%d, Y:%d\n", x, y);
}

void passiveMotionEventHandler (int x, int y)
{
	printf ("Mouse at pos X:%d, Y:%d\n", x, y);
}





